package GaoYuXuan.Homework0714;

import java.io.IOException;

/**
 * @author 盖
 * @version 1.0
 * @since 2022-07-14 19:30:58
 */
public class RunTime {
    public static void main(String[] args) throws IOException {
        Runtime runtime = Runtime.getRuntime();
        //几个处理器
        System.out.println(runtime.availableProcessors() + "个");
        //最大内存
        System.out.println(runtime.maxMemory() + "Bytes");
        //总的内存
        System.out.println(runtime.totalMemory() + "Bytes");
        //空余内存
        System.out.println(runtime.freeMemory() + "Bytes");

        //打开画图
        runtime.exec("mspaint");
        //打开计算器
        runtime.exec("calc");
        //打开远程连接
        runtime.exec("mstsc");
    }
}